﻿<%@ Page Title="" Language="C#" MasterPageFile="~/template.Master" AutoEventWireup="true"
    CodeBehind="ContactList.aspx.cs" Inherits="SystemDirectory.ContactList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        .top {
	        border: 0px solid #ccc;
	        overflow: hidden;
	        padding: 0;
	        margin: 0;
	        padding-bottom: 2px; 
	        -webkit-border-radius: 5px;
	        -moz-border-radius: 5px;
	        border-radius: 5px;
        }
        .top-left {
	        border: 0px solid #ccc;
	        font:bold 14px Arial,  Verdana, Helvetica, sans-serif;
	        float: left;
	        padding: 5px 0;
        }
        .top-right {
	        border: 0px solid #ccc;
	        float: right;
	        text-align: right;
        }
        .details1 {
	        overflow: hidden;
        }
        .content-left {
	        float: left;
	        padding-right: 50px;
        }
        .content-right {
        }
        .frm div {
            display: table;
            position: static;
        }
        .frm div label {
	        width: 150px;
	        word-wrap: break-word;
	
	        display: table-cell;
            vertical-align: middle;
            position: static;
        }
        .frm textarea {
	        width: 260px;
	        height: 80px;
        }
        .frm input[type="text"], input[type="password"] {
	        width: 260px;
        }
        .frm select {
	        width: 270px;
        }
        .frm .field
	        display:table;
        }
        .searchText
        {
            margin-top:10px;width:35%;
        }
        .highlight
        {
            background-color:#EEEEEE;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#ContentPlaceHolder1_txtId").hide();
            $("li").removeClass("active");
            $(".contact").addClass("active");
            $('.select').click(function () {
                //$('#select:checked tr').addClass("highlight");
                $('tr:has(input)').removeClass("highlight");
                $('tr:has(input:checked)').addClass("highlight");
            })
        })
        function fillId() {
            $("#ContentPlaceHolder1_txtId").val($('#select:checked').val());
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="content">
        <div id="mainContainer">
            <div class="box">
                <div id="container-orglst">
                    <h4>
                        <a href="#">Search Contact</a>
                    </h4>
                    <form>
                    <div class="tabDetails" style="height: 50px">
                        <div class="field">
                            <label for="postcode" style="display: inline-block; margin-left: 5px; margin-right: 15px">
                                First Name :
                            </label>
                            <asp:TextBox ID="txtFirstName" CssClass="searchText" runat="server"></asp:TextBox>
                            <label for="street" style="display: inline-block; margin-left: 30px">
                                Surname :
                            </label>
                            <asp:TextBox ID="txtSurName" CssClass="searchText" runat="server"></asp:TextBox>
                        </div>
                    </div>
                    </br>
                    <div>
                        <!--<input type="button" value="Search Contact" class="btn btn-primary" style="margin-right:10px" />-->
                        <asp:Button ID="btnSearch" runat="server" Text="SearchContact" CssClass="btn btn-primary"
                            OnClick="btnSearch_Click" />
                        <input type="button" value="None" class="btn btn-primary" style="margin-right: 10px" />
                        <input type="reset" value="Clear" class="btn btn-primary" style="margin-right: 10px" />
                        <a href="../Forms/ContactCreate.aspx">
                            <input type="button" class="btn btn-primary" value="Create" /></a>
                    </div>
                    </br>
                    <div>
                        <asp:CheckBox ID="cbxInactive" Text="Include in-active contact?" CssClass="checkbox inline"
                            runat="server" AutoPostBack="True" OnCheckedChanged="cbxInactive_CheckedChanged" />
                    </div>
                    <div class="div-table">
                        <asp:Repeater ID="rptContact" runat="server">
                            <HeaderTemplate>
                                <table width="100%" class="table-bordered">
                                    <thead>
                                        <tr style="background: #006dcc">
                                            <th>
                                            </th>
                                            <th>
                                                Contact Name
                                            </th>
                                            <th>
                                                Mobile Phone
                                            </th>
                                            <th>
                                                Email
                                            </th>
                                            <th>
                                                Contact Type
                                            </th>
                                            <th>
                                                Is Active?
                                            </th>
                                            <th>
                                                Note
                                            </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <input type="radio" name="select" class="select" id="select" value="<%#Eval("ContactId") %>" />
                                    </td>
                                    <td>
                                        <%#Eval("FirstName") %>
                                    </td>
                                    <td>
                                        <%#Eval("MobilePhone") %>
                                    </td>
                                    <td>
                                        <%#Eval("Email") %>
                                    </td>
                                    <td>
                                        <%#Eval("ContactTypeID") %>
                                    </td>
                                    <td>
                                        <%#Eval("IsActive") %>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </tbody> </table>
                            </FooterTemplate>
                        </asp:Repeater>
                        </br> <span class="pagelinks" style="float: right;">
                            <asp:HyperLink ID="hplBackward" runat="server"><span class="icon icon-backward"></span></asp:HyperLink>
                            Page
                            <asp:Label ID="lblCurrent" runat="server" Text="Label"></asp:Label>
                            of <span class="nops">
                                <asp:Label ID="lblTotal" runat="server" Text="Label"></asp:Label>
                            </span>
                            <asp:HyperLink ID="hplForward" runat="server"><span class="icon icon-forward"></span></asp:HyperLink>
                        </span>
                    </div>
                    <div class="form-inline">
                        <input type="button" value="Select" class="btn btn-primary" style="margin-top: 40px;
                            margin-right: 10px" />
                        <asp:LinkButton ID="lbnEdit" runat="server" CssClass="btn btn-primary" OnClientClick="fillId()"
                            OnClick="lbnEdit_Click">Edit</asp:LinkButton>
                        <input type="button" class="btn btn-primary" value="Close" style="margin-top: 40px;
                            margin-right: 10px" />
                    </div>
                    <asp:TextBox ID="txtId" runat="server"></asp:TextBox>
                    </form>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
